package com.hhit.collaborative_learning.learning;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hhit.collaborative_learning.dao.impl.PublicDaoImplMySql;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class GetCommentServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String blogId=request.getParameter("blogId");
		String currentPage=request.getParameter("currentPage");
		PublicDaoImplMySql dao=new PublicDaoImplMySql();
		response.getWriter().print(dao.getComment(Integer.parseInt(blogId), currentPage));
	}

}
